package com.example.config;

import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WatcherApi implements Watcher {

    private static final Logger logger = LoggerFactory.getLogger(WatcherApi.class);
    @Override
    public void process(WatchedEvent watchedEvent) {
        logger.info("watcher 监听事件 = {}",watchedEvent.getState());
        logger.info("watcher 监听路径 = {}",watchedEvent.getPath());
        logger.info("watcher 监听类型 = {}",watchedEvent.getType());
    }
}
